﻿Ext.define('MyApp.store.Invoices', {
    extend : 'Ext.data.Store',
    model: 'MyApp.models.Invoice',

    proxy: {
        type: 'ajax',
        url: '/json/servidor.json',
        api: {
            create : '/json/save',
            read: '/json/servidor.json',
            update : '/json/update',
            destroy : '/json/remove'
        },
        reader: {
            type: 'json',
            root : 'data'
        },
        writer: {
            type: 'json',
            allowSingle : false
        }
    }
});